const RP2040_HUE = 65;

//pico板载资源....................................................................................................................................................
export const xnr_board_bootsel = {
    init: function () {
        this.appendDummyInput()
            .appendField("BOOTSEL 按键");
        this.setOutput(true, null);
        this.setColour(RP2040_HUE);
        this.setTooltip("");
        this.setHelpUrl("");
    }
};

export const xnr_board_temp = {
    init: function () {
        this.appendDummyInput()
            .appendField("Pico片内温度");
        this.setOutput(true, null);
        this.setColour(RP2040_HUE);
        this.setTooltip("");
        this.setHelpUrl("");
    }
};

//蓝牙....................................................................................................................................................................
export const xnr_serialBT_SerialBT = {
    init: function () {
        this.appendDummyInput()
            .appendField("Pico蓝牙是否开启成功?");
        this.setOutput(true, null);
        this.setColour("#5aa473");
        this.setTooltip("");
        this.setHelpUrl("");
    }
};

export const xnr_serialBT_available = {
    init: function () {
        this.appendDummyInput()
            .appendField("Pico蓝牙有数据可读吗?");
        this.setOutput(true, null);
        this.setColour("#5aa473");
        this.setTooltip("");
        this.setHelpUrl("");
    }
};

export const xnr_serialBT_read = {
    init: function () {
        this.appendDummyInput()
            .appendField("Pico蓝牙数据");
        this.setOutput(true, null);
        this.setColour("#5aa473");
        this.setTooltip("");
        this.setHelpUrl("");
    }
};

export const xnr_serialBT_write = {
    init: function () {
        this.appendValueInput("data")
            .setCheck(null)
            .appendField("Pico蓝牙发送数据");
        this.setPreviousStatement(true, null);
        this.setNextStatement(true, null);
        this.setColour("#5aa473");
        this.setTooltip("");
        this.setHelpUrl("");
    }
};

export const xnr_serialBT_init = {
    init: function () {
        this.appendValueInput("value")
            .setCheck(null)
            .appendField("初始化Pico蓝牙   通信波特率");
        this.setInputsInline(true);
        this.setPreviousStatement(true, null);
        this.setNextStatement(true, null);
        this.setColour("#5aa473");
        this.setTooltip("");
        this.setHelpUrl("");
    }
};
